Interactive Code Snippet Synthesis Through Repository Mining

نویسندگان

  • Zvonimir Pavlinovic
  • Domagoj Babic
  • Zvonimir Pavlinović
  • Domagoj Babić
چکیده

Programmers repeatedly reuse code snippets. Retyping boilerplate code, and rediscovering how to correctly sequence API calls, programmers waste time. In this paper, we develop techniques that automatically synthesize code snippets upon a programmer’s request. Our approach is based on discovering snippets located in repositories; we mine repositories offline and suggest discovered snippets to programmers. Upon request, our synthesis procedure uses programmer’s current code to find the best fitting snippets, which are then presented to the programmer. The programmer can then either learn the proper API usage or integrate the synthesized snippets directly into her code. We call this approach interactive code snippet synthesis through repository mining. We show that this approach reduces the time spent developing code for 32% in our experiments.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Enhancing intelligent API tutors with information about how APIs are used in practice AN ABSTRACT OF THE PROJECT OF

approved: ______________________________________________________ Christopher Scaffidi Application Programming Interfaces (APIs) enable software developers to utilize and create functionality that would otherwise take a lot of time and effort to build from scratch. Consequently, an essential part of software engineering training is for students to learn how to use APIs effectively. The existing ...

متن کامل

Template Mining in Source-code Digital Libraries

As a greater number of software developers make their source code available, there is a need to store such opensource applications into a repository, and facilitate search over the repository. The objective of this research is to build a digital library of Java source code, to enable search and selection of source code. We believe that such a digital library will enable better sharing of experi...

متن کامل

StaQC: A Systematically Mined Question-Code Dataset from Stack Overflow

Stack Overflow (SO) has been a great source of natural language questions and their code solutions (i.e., question-code pairs), which are critical for many tasks including code retrieval and annotation. In most existing research, question-code pairs were collected heuristically and tend to have low quality. In this paper, we investigate a new problem of systematically mining question-code pairs...

متن کامل

Sni'per: a Code Snippet RESTful API

Today we use the Web for almost everything, even to program. There are several specialized code editors gravitating on the Web and emulating most of the features inherited from traditional IDEs, such as, syntax highlight, code folding, autocompletion and even code refactorization. One of the techniques to speed the code development is the use of snippets as predefined code blocks that can be au...

متن کامل

Comparing the co-evolution of production and test code in open source and industrial developer test processes through repository mining

Engineering software systems is a multidimensional activity, whereby a number of artifacts must be created — and maintained — synchronously. In this paper we investigate how production code and the accompanying developer tests co-evolve, to create awareness with developers and managers alike about the testing process that is followed. We compose three views on this co-evolution through reposito...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2013